package org.particles.domain;

public abstract class AbstractFunction implements OneParamFunction {
	private double factor = 100;
	
	@Override
	public abstract double calc(double x);
	
	public abstract double calc(double x, double factor);

	/**
	 * @param factor to which distance 
	 * the field strength should be 0. strength will be
	 * increase linear by distance less than the given distance.
	 */
	public void setFactor(double factor) {
		this.factor = factor;
	}

	/**
	 * @return distance to which
	 * the field strength should be 0. strength will be
	 * increase linear by distance less than the given distance.
	 */
	public double getFactor() {
		return factor;
	}

}
